package com.hd.common.page.impl;

import java.util.HashMap;
import java.util.Map;

import com.hd.common.page.PageInfo;
/**
 * <p>功能:</p>
 * <p>生成日期: 2008-11-24</p>
 * <p>说明：</p>
 * @version V1.0
 * @修改日志:
 */
public class PageInfoImpl implements PageInfo {

	private Map filters;

	private int pageNumber;

	private int pageSize;

	private String sortingColumn;

	private String sortingDirection;
	
	public PageInfoImpl() {
	}
	
	public PageInfoImpl(int pageNumber, int pageSize) {
		this(pageNumber,pageSize,null,null,null);
	}
	
	public PageInfoImpl(int pageNumber, int pageSize, Map filters) {
		this(pageNumber,pageSize,filters,null,null);
	}
	
	public PageInfoImpl(int pageNumber, int pageSize, Map filters, String sortingColumn, String sortingDirection) {
		this.pageNumber = pageNumber;
		this.pageSize = pageSize;
		this.filters = filters;
		this.sortingColumn = sortingColumn;
		this.sortingDirection = sortingDirection;
	}

	public Map getFilters() {
		if(filters == null) {
			filters = new HashMap(0);
		}
		return filters;
	}

	public void setFilters(Map filters) {
		this.filters = filters;
	}

	public int getPageNumber() {
		return pageNumber;
	}

	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public String getSortingColumn() {
		return sortingColumn;
	}

	public void setSortingColumn(String sortingColumn) {
		this.sortingColumn = sortingColumn;
	}

	public String getSortingDirection() {
		return sortingDirection;
	}

	public void setSortingDirection(String sortingDirection) {
		this.sortingDirection = sortingDirection;
	}
}
